<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE struts-config PUBLIC
		"-//Apache Software Foundation//DTD Struts Configuration 1.2//EN"
		"http://jakarta.apache.org/struts/dtds/struts-config_1_2.dtd">

<struts-config>
	<!-- 页面表单 -->
	<form-beans>
		<!-- ${model.desc} 表单 -->
		<form-bean name="${model.initUpperName}Form" type="${model.packageName}.web.${model.initUpperName}Form" />
		<#list model.childModels as childModel>
		<!-- ${childModel.desc} 表单 -->
		<form-bean name="${childModel.initUpperName}Form" type="${model.packageName}.web.${childModel.initUpperName}Form" />
		</#list>
	</form-beans>
	<!-- 页面请求处理 -->
	<action-mappings>
	    <!-- ${model.desc} 页面请求 -->
		<action path="/${model.initUpperName}Action" 
		        name="${model.initUpperName}Form"
			    scope="request"
			    parameter="method"
			    type="${model.packageName}.web.${model.initUpperName}Action" >
			<forward name="list" path="/pages/${model.initLowerName}/${model.initLowerName}/${model.initUpperName}List.jsp" />
			<forward name="detail" path="/pages/${model.initLowerName}/${model.initLowerName}/${model.initUpperName}Detail.jsp" />
			<forward name="edit" path="/pages/${model.initLowerName}/${model.initLowerName}/${model.initUpperName}Edit.jsp" />
		</action>
		<#list model.childModels as childModel>	
		<action path="/${childModel.initUpperName}Action" 
		        name="${childModel.initUpperName}Form"
			    scope="request"
			    parameter="method"
			    type="${model.packageName}.web.${childModel.initUpperName}Action" >
			<forward name="list" path="/pages/${model.initLowerName}/${model.initLowerName}/${childModel.initUpperName}List.jsp" />
			<forward name="detail" path="/pages/${model.initLowerName}/${model.initLowerName}/${childModel.initUpperName}Detail.jsp" />
			<forward name="edit" path="/pages/${model.initLowerName}/${model.initLowerName}/${childModel.initUpperName}Edit.jsp" />
		</action>
		</#list>
	</action-mappings>
</struts-config>